﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.CustomerManagement.DtoModel;
using SystemCenterSoa.PoModel.CustomerManagement.PoModel;
using SystemCenterSoa.Repository.CustomerManagement.Repository;

namespace SystemCenterSoa.ApiProject.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CustomerManagementControllers : ControllerBase
    {
        private CustomerManagementRepository _getinfo;
        public CustomerManagementControllers(CustomerManagementRepository getinfo)
        {
            _getinfo = getinfo;
        }
        
        [HttpPost]
        public IActionResult CustomerManagementAdd(CustomerManagementDto info /*CustomerManagementExtendPo info2, FirstPartyPo info3, SatisfactionSurveyPo info4*/)
        {
            int n = _getinfo.CustomerManagementAdd(info /*info2, info3, info4*/);
            return Ok(n);
        }
        [HttpGet]
        public IActionResult GetCity(int id)
        {
            var list = _getinfo.GetCity(id);
            return Ok(list);
        }
        [HttpGet]
        public IActionResult GetClientTypes()
        {
            var list = _getinfo.GetClientTypes();
            return Ok(list);
        }

        [HttpGet]
        public IActionResult GetIndustryInfo()
        {
            var list = _getinfo.GetIndustryInfo();
            return Ok(list);
        }

        [HttpGet]
        public IActionResult GetCreditRatingsPo()
        {
            var list = _getinfo.GetCreditRatingsPo();
            return Ok(list);
        }

        [HttpGet]
        public IActionResult GetIntimacyPo()
        {
            var list = _getinfo.GetIntimacyPo();
            return Ok(list);
        }

        [HttpGet]
        public IActionResult GetSatisfactionPo()
        {
            var list = _getinfo.GetSatisfactionPo();
            return Ok(list);
        }

        [HttpGet]
        public IActionResult GetSatisfactionTypePo()
        {
            var list = _getinfo.GetSatisfactionTypePo();
            return Ok(list);
        }
    }
}
